// 查询是否工作时间
function workingTime() {
    var nowTime = new Date();
    var weekNum = nowTime.getDay();
    var hours = nowTime.getHours();

    var working_time = false;
    if (weekNum < 6 && hours > 8 && hours <= 21) {
        working_time = true;
    }

    return working_time;
}

// 
function setWorkTime() {
    var working_time = workingTime();
    if (working_time){
        $("#speak_btn").attr("class","weui-btn weui-btn_primary");
        $("#speak_btn").text("立即申请,两小时到账");
    }

}

module.exports = {
    workingTime: workingTime,
    setWorkTime: setWorkTime
}